#!/bin/sh

set -ex

main() {
  if [ -n "$CI" ]; then
    ./node_modules/.bin/prettier --check '**/*.{js,md,yml,json}'
  else
    ./node_modules/.bin/prettier '**/*.{js,md,yml,json}' --write
  fi
}

main "$@" 

